#!/usr/bin/env python
# -*- coding: utf-8 -*-#

#-------------------------------------------------------------------------------
# Name:         2-4-testlist.py
# Description:  
# Author:       handa
# Date:         2022/4/11
#-------------------------------------------------------------------------------
records=[]
def getitem(key):
    print(key)
    for k,v in records_tuple:
        if k == key:
            return v


records=[['name','ghd']]

records_tuple=(('name','ghd'),('a','b'))

r = getitem('name')
print(r)
print("xxx")
alist=[['name','ghd'],['age','30']]
for k in alist:
    print(k[0])
    if k[0] == 'name':
        print('enter name')
        print (alist[0][1])